<template>
	<view class="content">
		<Header></Header>
		<Carousel></Carousel>
		<Stores></Stores>
		<Information :newListData="newListData"></Information>
	</view>

</template>

<script>
	import Header from "../../Components/title/header.vue"
	import Carousel from "../../Components/center/Img.vue"
	import Stores from "../../Components/center/Store.vue"
	import Information from "../../Components/center/Information.vue"
	import {
		getNewList
	} from "../../apis/index.js"
	import {
		IMAGE_BASE_URL
	} from '@/config/index.js'
	export default {
		components: {
			Header,
			Carousel,
			Stores,
			Information
		},
		data() {
			return {
				// title:"oooo",
				newListData: [],
				query:{
					page : 1,
					psize : 10
				}
			}
		},
		onLoad() {
			this.getnewdata()
			console.log(this.title);
		},
		methods: {
			async getnewdata() {
				let res = await getNewList(this.query)
				console.log('公告列表', res);
				res.list.forEach((item)=>{
					item.picture = item.picture?IMAGE_BASE_URL+item.picture:'/static/images/list_03.jpg'
				})
				this.newListData = res.list
			}
		}
	}
</script>

<style>
	.content {}
</style>